package com.animallife.android.ui;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

import com.animallife.android.R;
import com.animallife.android.util.Config;

public class WikiActivity extends Activity {

	public static final String WIKI_URL = "http://en.m.wikipedia.org/wiki/";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.wiki);
		String animalName = getIntent().getStringExtra(Config.ANIMAL_NAME);
		WebView webview = (WebView) findViewById(R.id.webview);
		webview.getSettings().setJavaScriptEnabled(true);
		webview.loadUrl(WIKI_URL.concat(animalName.replaceAll(" ", "_")));

	}

}
